import request from '@/utils/request'

export function getEnergyEfficiencyWarningApi(params) {
  return request({
    url: '/warning/page',
    method: 'GET',
    params
  })
}

export function addOrUpdateWarningApi(data) {
  console.log(data)
  return request({
    url: '/warning',
    method: data.id ? 'PUT' : 'POST',
    data
  })
}

export function delWarningApi(id) {
  return request({
    url: '/warning/' + id,
    method: 'DELETE'
  })
}
